<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head><title>Login Page</title></head>
<body onload='document.f.username.focus();'>
<h3>请登录</h3>
<form name='f' action='login' method='POST'>
    <table>
        <tr>
            <td>用户名:</td>
            <td><input type='text' name='username' value=''></td>
        </tr>
        <tr>
            <td>密码:</td>
            <td><input type='password' name='password'/></td>
        </tr>
        <tr>
            <td colspan='2'><input name="submit" type="submit" value="Login"/></td>
        </tr>
        <tr th:if="${tokenName != null}">
            <td colspan='2'><input th:name="${tokenName}" type="hidden" th:value="${token}"/></td>
        </tr>
        <tr th:if="${error!=null}">
            <td colspan='2'><p th:text="${error}"></p></td>
        </tr>

    </table>
</form>
</body>
</html>